<?php

namespace app\common\model\Depot;

use think\Model;

class Supplier extends Model
{
    protected $name = 'depot_supplier';

    protected $autoWriteTimestamp = true;

    protected $createTime = 'createtime';

    protected $updateTime = false;
    public function region()
     {
         return $this->belongsTo('app\common\model\Region\Region', 'district', 'code', [], 'LEFT')->setEagerlyType(0);
     }
     public function districts()
     {
         return $this->belongsTo('app\common\model\Region\Region', 'district', 'code', [], 'LEFT')->setEagerlyType(0);
     }
     public function citys()
     {
         return $this->belongsTo('app\common\model\Region\Region', 'city', 'code', [], 'LEFT')->setEagerlyType(0);
     }
     public function provinces()
     {
         return $this->belongsTo('app\common\model\Region\Region', 'province', 'code', [], 'LEFT')->setEagerlyType(0);
     }
}